import request from '@/utils/request'
import { Login, Register } from '@/types/login'
import { baseResponse, Class } from '@/types/public'

export const registerUser = async (data: Register) => {
  return (await request.post<baseResponse<string>>('Login/RegisterUser', data)).data
}

export const loginUser = async (data: Login) => {
  return (await request.post<baseResponse<string>>('Login/Login', data)).data
}

export const registerStudentClass = async () => {
  return (await request.get<baseResponse<Array<Class>>>('Login/GetRegisterClasses')).data
}
